<%@page contentType="text/html;charset=utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title>购物车</title>
		<meta http-equiv=Content-Type content="text/html; charset=utf-8" />
		<link href="../css/book.css" rel="stylesheet" type="text/css" />
		<link href="../css/second.css" rel="stylesheet" type="text/css" />
		<link href="../css/secBook_Show.css" rel="stylesheet" type="text/css" />
		<link href="../css/list.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../js/prototype-1.6.0.3.js"></script>
		<link rel="stylesheet" href="../css/gwap.css" type="text/css" />
		<link href="../css/tbsp.css" type="text/css" rel="stylesheet" />

		<style type=text/css media=screen />
		</STYLE>
		<!-- 引入外部 css 文件 -->
		<!-- 引入外部 js 文件 -->
		<script language="JavaScript" src="../js/tarena.js"></script>
		<link href="../css/cart_v2.css" type="text/css" rel="stylesheet" />
	</head>
	<body>


			<!--页头 开始-->
		<div style="width: 962px; margin: auto;">
		<%@include file="../common/head3.jsp"%>
		</div>
			<!--页头 结束-->
		<div align="center" />
			

			<!-- Core Code...Start -->
			<DIV id=page>
				<DIV id=header>
					<DIV class=grid-c id=content>
						<tr>
							<td>
								<table width="100%" border="0">
									<tr>
										<td width="30%" align="left">
											<img class="pic_shop"
												src="../images/shopcart/pic_myshopping.gif" title="我的购物车" />
										</td>
										<td align="left">
											9周年店庆，全场免普通快递送货上门费和普通邮递费
										</td>

									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<DIV id=cart>
								<TABLE class=cart-table id=J_CartEnable cellSpacing=0
									cellPadding=0>
									<THEAD>
										<th class=s-chk>
											<label for=j_selectall>
												序号
											</label>
										</th>
										<th class=s-title>
											商品名称
										</th>
										<th class=s-point>
											市场价
											<a class=q id=j_pointtiptrigger title=? href="#"><span>?</span>
											</a>
										</th>
										<th class=s-price>
											当当价
										</th>
										<th class=s-amount>
											数量
										</th>
										<th class=s-agio>
											优惠
										</th>
										<th class=s-total>
											小计(元)
										</th>
										<th class=s-del>
											操作
										</th>
										</tr>
									</THEAD>

									<!-- 开始迭代购物车里的数据 -->
									<s:iterator value="cart.cartItems" var="item" status="st">
									<s:if test="status == true">
										<tbody>
											<tr class=shop>
												<td colSpan=8>
												</td>
											</tr>
											<tr class=uncod
												data-itemid="8c48b1fb33b8e7ba5226561114ee8c03"
												data-cartid="1192666788">
												<TD class=s-chk id="byproductid">
													<s:property value="#st.count" />
												</TD>
												<td class=s-title>
													<a title="${item.product.productName}" href="#"
														target=_blank> <img
															src="../product/${item.product.productPic}" />
														${item.product.productName} </a>
												</td>
												<td class=s-point>
													<EM>￥${item.product.fixedPrice}</EM>
												</td>
												<td class=s-price>
													<EM>${item.product.dangPrice}</EM>
												</td>
												<td>
													<input class="del_num" type="text" size="2" maxlength="3"
														id="it_${item.product.id}" value='${item.number}' />
													<a href="javascript:;"
														onclick="location='updatecart.action?productId=${item.product.id}&number='+$('it_${item.product.id}').value">
														变更</a>

												</td>
												<td class=s-agio>
													无优惠
												</td>
												<td class=s-total>
													<EM>${item.product.dangPrice * item.number}</EM>
												</td>
												<td class=s-del>
													<a href="javascript:;"
														onclick="location='dropproduct.action?productId=${item.product.id}'">删除</a>
												</td>
											</tr>
										</tbody>
									</s:if>
									</s:iterator>
									<!-- 迭代结束 -->

									<tbody>
										<TFOOT>
											<tr>
												<td class=point-info colSpan=5>
												<a href='../catalog/book_list.action?cTwo=2'>
												继续浏览商品</a>
												&nbsp;&nbsp;&nbsp;&nbsp;
												<a href="clearcart.action">清空购物车</a></td>
												<td class=charge-info colSpan=3>
													商品总价(不含运费)：
													<EM class=total id=J_Total>${cart.dangPrice }</EM>元
													<!-- 结算 -->
													<a name='checkout' href='javascript:;' onclick="chekcProductCount();" > <img
															src="../images/shopcart/butt_balance.gif" alt="结算"
															border="0" title="结算" /> </a>
												</td>
											</tr>
										</TFOOT>
									</tbody>
								</TABLE>
							</DIV>
							
							<script type="text/javascript">
							var productConut = null;
							function chekcProductCount(){
							productConut =  $('byproductid').value;
							if( productConut == null ){
									location="../order/order.action";
								}
							}
							</script>
							
					</DIV>
				</DIV>
			</DIV>

			<!-- 被删除的 -->
			<div id=page>
				
					<DIV class=grid-c id=content>
						<tr>
							<td align="left">
								<h3>
									被你删除的商品
								</h3>
							</td>
						</tr>
						<tr>
							<DIV id=cart>
								<TABLE class=cart-table id=J_CartEnable cellSpacing=0
									cellPadding=0>
									<THEAD>
										<th class=s-chk>
											<label for=j_selectall>
												序号
											</label>
										</th>
										<th class=s-title>
											商品名称
										</th>
										<th class=s-point>
											市场价
											<a class=q id=j_pointtiptrigger title=? href="#"><span>?</span>
											</a>
										</th>
										<th class=s-price>
											当当价
										</th>

										<th class=s-del>
											操作
										</th>
										</tr>
									</THEAD>
									<!-- 开始迭代购物车里的数据 -->
									<s:iterator value="cart.cartItems" var="item" status="st">
										<s:if test="status == false">
											<tbody>
												<tr class=shop>
													<td colSpan=8>
													</td>
												</tr>
												<tr class=uncod
													data-itemid="8c48b1fb33b8e7ba5226561114ee8c03"
													data-cartid="1192666788">
													<TD class=s-chk>
														<s:property value="#st.count" />
													</TD>
													<td class=s-title>
														<a title="${item.product.productName}" href="#"
															target=_blank> <img
																src="../product/${item.product.productPic}" />
															${item.product.productName} </a>
													</td>
													<td class=s-point>
														<EM>￥${item.product.fixedPrice}</EM>
													</td>
													<td class=s-price>
														<EM>${item.product.dangPrice}</EM>
													</td>

													<td class=s-del>
														<a href="javascript:;"
															onclick="location='recovery.action?productId=${item.product.id}'">恢复</a>
													</td>
												</tr>
											</tbody>
											</s:if>
										</s:iterator>
										<!-- 迭代结束 -->
								</TABLE>
							</DIV>
					</DIV>
				</DIV>
			
		
		
			<!-- 被删除的 -->
	</body>

</html>



